home *** CD-ROM | disk | FTP | other *** search
Wrap
property imageup, imageroll, imagedown, clicked, pSoundDown, pSoundDownChannel, pSoundRoll, pSoundRollChannel on mouseEnter me if me.clicked then if the mouseDown then set the member of sprite the spriteNum of me to me.imagedown else set the member of sprite the spriteNum of me to me.imageroll end if else set the member of sprite the spriteNum of me to me.imageroll end if if pSoundRoll <> EMPTY then puppetSound(pSoundRollChannel, pSoundRoll) end if updateStage() end on mouseDown me set the member of sprite the spriteNum of me to me.imagedown me.clicked = 1 if pSoundDown <> EMPTY then puppetSound(pSoundDownChannel, pSoundDown) end if updateStage() pass() end on mouseLeave me set the member of sprite the spriteNum of me to me.imageup end on mouseUp me set the member of sprite the spriteNum of me to me.imageroll if me.clicked then me.clicked = 0 pass() end if end on mouseUpOutSide me set the member of sprite the spriteNum of me to me.imageup me.clicked = 0 end on beginSprite me me.clicked = 0 end on getPropertyDescriptionList if the currentSpriteNum = 0 then memdefault1 = 0 else memref = the member of sprite the currentSpriteNum castLibNum = memref.castLibNum memdefault0 = member(member(memref).memberNum, castLibNum) memdefault1 = member(member(memref).memberNum + 1, castLibNum) memdefault2 = member(member(memref).memberNum + 2, castLibNum) end if p_list = [#imageup: [#comment: "Button Up Image:", #format: #member, #default: memdefault0], #imageroll: [#comment: "Button Rollover Image:", #format: #member, #default: memdefault1], #imagedown: [#comment: "Button Down Image:", #format: #member, #default: memdefault2], #pSoundDown: [#comment: "Sound for DownState:", #format: #string, #default: EMPTY], #pSoundDownChannel: [#comment: "soundChannel:", #format: #integer, #default: "3"], #pSoundRoll: [#comment: "Sound for RollState:", #format: #string, #default: EMPTY], #pSoundRollChannel: [#comment: "SoundChannel", #format: #integer, #default: "3"]] return p_list end on getBehaviorDescription return "This is a tri-state button without sounds" & RETURN & "In my opinion this button behaves like it should" & RETURN & RETURN & "PARAMETERS:" & RETURN & "ImageUp: the cast member for the normal (not pressed state)" & RETURN & "ImageRoll: the cast member for the button when a rollover occurs" & RETURN & "ImageDown: the cast member for the button when a mousedown on the button is valid" end